#pragma once
/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Foundation Framework Class Library
 * Version 2.00
 * 
 * DNS Record Factory Class
 *      A factory class implementation for generating DNS record structures.
 *------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------
 * System Imports
 *------------------------------------------------------------------------------*/
#include "stdafx.h"
using namespace System;
using namespace System::Net;

namespace Adaptive
{
	namespace Network
	{
		namespace Dns
		{
			/// <summary>
			/// Provides a factory implementation for creating appropriate DNS record structures.
			/// </summary>
			public ref class DnsRecordFactory sealed
			{
			private:
				/// <summary>
				/// Initializes a new instance of the class.
				/// </summary>
				/// <summary>
				/// This constructor is hidden to prevent instantiation.
				/// </summary>
				DnsRecordFactory();

			public:
				/// <summary>
				/// Creates a new <b>DnsAddressRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsAddressRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsAddressRecord^		CreateDnsAddressRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsATMAddressRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsATMAddressRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsATMAddressRecord^	CreateDnsATMAddressRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsIp6AddressRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsIp6AddressRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsIp6AddressRecord^	CreateDnsIp6AddressRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsKeyRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsKeyRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsKeyRecord^			CreateDnsKeyRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsMailExchangeRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsMailExchangeRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsMailExchangeRecord^		CreateDnsMailExchangeRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsMailInformationRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsMailInformationRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsMailInformationRecord^	CreateDnsMailInformationRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsNextRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsNextRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsNextRecord^				CreateDnsNextRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsNullRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsNullRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsNullRecord^				CreateDnsNullRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsPointerRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsPointerRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsPointerRecord^			CreateDnsPointerRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsServiceRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsServiceRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsServiceRecord^			CreateDnsServiceRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsSignatureRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsSignatureRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsSignatureRecord^			CreateDnsSignatureRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsStartOfAuthorityRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsStartOfAuthorityRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsStartOfAuthorityRecord^	CreateDnsStartOfAuthorityRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsTextRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsTextRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsTextRecord^				CreateDnsTextRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsTKeyRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsTKeyRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsTKeyRecord^				CreateDnsTKeyRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsTSignatureRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsTSignatureRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsTSignatureRecord^			CreateDnsTSignatureRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsWellKnownServiceRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsWellKnownServiceRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsWellKnownServiceRecord^	CreateDnsWellKnownServiceRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsWINSRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsWINSRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsWINSRecord^				CreateDnsWINSRecord( DNS_RECORD* originalRecord );
				/// <summary>
				/// Creates a new <b>DnsWINSReverseLookupRecord</b> structure from the original unmanaged data.
				/// </summary>
				/// <remarks>
				/// This factory method is used to create and initialize the appropriate structure data.
				/// An unmanaged DNS record will always have entries for each DNS record type, although each
				/// may not be populated by the DNS query.
				/// </remarks>
				/// <param name="originalRecord">A pointer to a <b>DNS_RECORD</b> structure containing the information
				/// to be copied.</param>
				/// <returns>
				/// A new <see cref="DnsWINSReverseLookupRecord"/> structure, populated with the DNS data if present; otherwise,
				/// initialized to basic empty values.
				/// </returns>
				static DnsWINSReverseLookupRecord^	CreateDnsWINSReverseLookupRecord( DNS_RECORD* originalRecord );
			};
		}
	}	
}
